<?php

namespace Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * MissionCompleted
 *
 * @ORM\Table(name="mission_completed")
 * @ORM\Entity
 */
class MissionCompleted
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $id;

    /**
     * @var boolean
     *
     * @ORM\Column(name="success", type="boolean", nullable=false)
     */
    protected $success;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="completed_on", type="datetime", nullable=false)
     */
    protected $completedOn;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="cooldown_until", type="datetime", nullable=true)
     */
    protected $cooldownUntil;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="last_modified", type="datetime", nullable=false)
     */
    protected $lastModified;

    /**
     * @var boolean
     *
     * @ORM\Column(name="next_chance", type="boolean", nullable=true)
     */
    protected $nextChance;

    /**
     * @var \Entity\Mission
     *
     * @ORM\ManyToOne(targetEntity="Entity\Mission")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="mission_id", referencedColumnName="id")
     * })
     */
    protected $mission;

    /**
     * @var \Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    protected $user;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set success
     *
     * @param boolean $success
     * @return MissionCompleted
     */
    public function setSuccess($success)
    {
        $this->success = $success;
    
        return $this;
    }

    /**
     * Get success
     *
     * @return boolean 
     */
    public function getSuccess()
    {
        return $this->success;
    }

    /**
     * Set completedOn
     *
     * @param \DateTime $completedOn
     * @return MissionCompleted
     */
    public function setCompletedOn($completedOn)
    {
        $this->completedOn = $completedOn;
    
        return $this;
    }

    /**
     * Get completedOn
     *
     * @return \DateTime 
     */
    public function getCompletedOn()
    {
        return $this->completedOn;
    }

    /**
     * Set cooldownUntil
     *
     * @param \DateTime $cooldownUntil
     * @return MissionCompleted
     */
    public function setCooldownUntil($cooldownUntil)
    {
        $this->cooldownUntil = $cooldownUntil;
    
        return $this;
    }

    /**
     * Get cooldownUntil
     *
     * @return \DateTime 
     */
    public function getCooldownUntil()
    {
        return $this->cooldownUntil;
    }

    /**
     * Set lastModified
     *
     * @param \DateTime $lastModified
     * @return MissionCompleted
     */
    public function setLastModified($lastModified)
    {
        $this->lastModified = $lastModified;
    
        return $this;
    }

    /**
     * Get lastModified
     *
     * @return \DateTime 
     */
    public function getLastModified()
    {
        return $this->lastModified;
    }

    /**
     * Set nextChance
     *
     * @param boolean $nextChance
     * @return MissionCompleted
     */
    public function setNextChance($nextChance)
    {
        $this->nextChance = $nextChance;
    
        return $this;
    }

    /**
     * Get nextChance
     *
     * @return boolean 
     */
    public function getNextChance()
    {
        return $this->nextChance;
    }

    /**
     * Set mission
     *
     * @param \Entity\Mission $mission
     * @return MissionCompleted
     */
    public function setMission(\Entity\Mission $mission = null)
    {
        $this->mission = $mission;
    
        return $this;
    }

    /**
     * Get mission
     *
     * @return \Entity\Mission 
     */
    public function getMission()
    {
        return $this->mission;
    }

    /**
     * Set user
     *
     * @param \Entity\User $user
     * @return MissionCompleted
     */
    public function setUser(\Entity\User $user = null)
    {
        $this->user = $user;
    
        return $this;
    }

    /**
     * Get user
     *
     * @return \Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
